let arr1 = [1, 2, 3];
let arr2 = [1, 2, 3];

//console.log(arr1 === arr2) //false
//console.log(arr1 == arr2) //false

//方法1 JSON 序列化
//console.log(JSON.stringify(arr1) === JSON.stringify(arr2))
// 问题

let arr3 = [null, 2, 3]; // 打印返回 [null,2,3]
let arr4 = [undefined, 2, 3]; // 打印返回 [null,2,3]
// 进行了错误的判断
//console.log(JSON.stringify(arr3) === JSON.stringify(arr4)); //true 

console.log((arr3.length === arr4.length) && (arr3.every((item, index) => {
  return item === arr4[index];
})))